package com.service.bean.signal;

import java.sql.Timestamp;
import java.util.Date;

/**
 * 车辆行驶速度
 * @author lj
 * Created on 2015年6月9日
 */
public class GpsSignalWorkSpeed {
	/**
	 * 外键Id
	 */
	public String signalId;
	/**
	 * Gps时间
	 */
	public Date gpsTime;
	/**
	 * 设备Id
	 */
	public String equipmentId;
	/**
	 * 即时车速
	 */
	public int speed;
	/**
	 * 开始时间
	 */
	public Date startTime;
	/**
	 * 持续时间
	 */
	public long keepTime;
	/**
	 * 最高车速
	 */
	public double maxSpeed;
	/**
	 * 地址
	 */
	public String address;
	
	@SuppressWarnings("deprecation")
	public Object[] getAll() {
		Object[] objs = new Object[9];
		objs[0] = "'" + this.signalId + "'";
		objs[1] = this.gpsTime == null ? this.gpsTime : "'" + new Timestamp(this.gpsTime.getTime()) + "'";
		objs[2] = "'" + this.equipmentId + "'";
		objs[3] = this.speed;
		objs[4] = this.startTime == null ? this.startTime : "'" + new Timestamp(this.startTime.getTime()) + "'";
		objs[5] = String.valueOf(this.keepTime);
		objs[6] = String.valueOf(this.maxSpeed);
		objs[7] = this.address == null ? this.address : "'" + this.address + "'";
		objs[8] = this.gpsTime.getMonth()+1;
		return objs;
	}
	
}
